<?php
header("Content-type:application/vnd.ms-excel");
header("Content-Disposition:filename=團購卷資料.xls");
?>
 <table widtd="100%" align="center"  border="1">
    <tr>
      <td>編號</td>
      <td>訂單號</td>      
      <td>序列號</td>
      <td>密碼</td>
      <td>商品內容</td>
      <td>購買人帳戶</td>      
      <td>顧客簽名</td>
      <td>過期時間</td>
      <td>使用時間</td>
      <td>備註</td>
    </tr>
	<?php if(is_array($dataarray)){foreach($dataarray as $value){?>
    <tr class="odd_row">
      <td><?php echo $value['bid']?></td>
      <td><?php echo $value['order_sn']?></td>          
      <td><?php echo $value['sn']?></td>      
      <td><?php echo $value['password']?></td>            
      <td><?php echo $value['gtitle']?></td>  
      <td><?php echo $value['uname']?></td>
      <td></td>
      <td><?php echo date("Y-m-d H:i",$value['endtime'])?></td>
      <td><?php if($value['usetime']!=0)echo date("Y-m-d H:i",$value['usetime'])?>&nbsp;</td>
      <td></td>
    </tr>
	<?php }}else{?>
	<tr><td colspan=10>暫無數據..............</td></tr>
	<?php };?>
  </table>
